Home
PHP
Tags
PHP Tutorial
Latest Articles
English
English
简体中文
中文(繁體)
日本語
한국어
Français
Deutsch
မြန်မာဘာသာ
Current Location:
Home
>
Function Categories
>
date_sub
date_sub
DateTime::sub - Subtract a certain amount of days, months, years, hours, minutes, and seconds to a DateTime object
Name:
date_sub
Category:
Date and time
Programming Language:
php
One-line Description:
Subtract the day, month, year, hour, minute, and second from the specified date.
Related
Use date_sub function to subtract weekdays: How to avoid weekends
2
Frequently Asked Questions about the date_sub function when handling time zones
2
date_sub function: How to subtract a specified time from the current date
9
Similar Functions
date_interval_format
date_interval_format
AliasforDateInterv
date_diff
date_diff
AliasforDateTime::
date_sub
date_sub
DateTime::sub-Subtra
mktime
mktime
GetaUnixtimestampfor
date_sun_info
date_sun_info
Returnsanarraywithin
date_modify
date_modify
AliasforDateTime::
gmdate
gmdate
FormatGMT/UTCdate/ti
date_time_set
date_time_set
DateTime::setTimeali
Popular Articles
Frequently Asked Questions about the date_sub function when handling time zones
Use date_sub function to subtract weekdays: How to avoid weekends
date_sub function: How to subtract a specified time from the current date